<?php
/* admenu0.php 2006-07-02 12:48:44
   Conference Registration - Registration for conferences - A XOOPS CMS Module
   Copyright (c) 2006 Kevin van Haaren, US
   URL:     http://www.superfantasmoworld.com/
   Contact: kevin@vanhaaren.net
 	
   XOOPS
   Copyright (c) 2000 XOOPS.org
   URL:     http://www.xoops.org/
    
   This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    
 */
 
//The next comment block is for PHPDocumentor
/**
 * Conference Registration - Registration for conferences
 * 
 * Admin menu option:
 * Setup a new conference
 * 
 * @author Kevin van Haaren (kevin@vanhaaren.net)
 * @copyright 2006 Kevin van Haaren, US
 * @package CONFREG
 * @subpackage Admin_Function
 * 
 */

/**
* Do all the declarations etc needed by an admin page
*/
include_once "adminheader.inc";

$cleanPost = cleanInput($_POST);

$conferences = $xoopsDB->query("SELECT conf_id,title,start_date,end_date,reg_start,reg_end" .
								" FROM " . $xoopsDB->prefix("confreg_conferences") . " WHERE conf_id=" . intval($cleanPost['conf_id']));
$confData = $xoopsDB->fetchArray($conferences);

include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';

echo 'Extras are additional items registrees can select during registration. Items with the same start date/time are grouped together and only one can be selected. Items where the start and end times are equal are shown as check boxes.';

// conference description
$wform = new XoopsThemeForm(_AM_CONFREG_EXTRA_ADD . " " . $confData['title'],'insertextra','insertextra.php', 'POST');
$wform->addElement(new XoopsFormText(_AM_CONFREG_NAME, 'name', 48, 48));
$wform->addElement(new XoopsFormText(_AM_CONFREG_DESC, 'desc', 60, 128));
$wform->addElement(new XoopsFormText(_AM_CONFREG_COST, 'cost', 10, 10));
$wform->addElement(new XoopsFormText(_AM_CONFREG_MAX_ATTEND, 'max_attend', 10, 10));
$wform->addElement(new XoopsFormRadioYN(_AM_CONFREG_EXTRA_ON_OFF, 'on_off', 0, _AM_CONFREG_ON, _AM_CONFREG_OFF));
$wform->addElement(new XoopsFormRadioYN(_AM_CONFREG_ALLOW_GUESTS, 'guests', 0, _YES, _NO));
$wform->addElement(new XoopsFormText(_AM_CONFREG_GUEST_COST, 'guest_cost', 10, 10));
$wform->addElement(new XoopsFormDateTime(_AM_CONFREG_START_DATE . '</span><br /><span style="font-weight:normal;">' . _AM_CONFREG_EXTRA_DATE_INS, 'start_time', 15, strtotime($confData['start_date'])));
$wform->addElement(new XoopsFormDateTime(_AM_CONFREG_END_DATE, 'end_time', 15, strtotime($confData['start_date'])));
$wform->addElement(new XoopsFormHidden('conf_id',$confData['conf_id']));
$wform->addElement(new XoopsFormButton(_AM_CONFREG_CREATE, 'submit', _AM_CONFREG_SUBMIT, 'submit'));
$wform->display();

xoops_cp_footer();

/*
 * This file was generated by XBS ModGen, (c) 2006 A Kitson, UK. See http://xoobs.net
 * ModGen is a Module Code Generator for the Xoops CMS.  See http://xoops.org
 */
?>
